<ion-view title="任务">
    <ion-nav-bar class="bar-dark box-shadow">
        <ion-nav-back-button></ion-nav-back-button>

    </ion-nav-bar>
    <div class="bar bar-subheader">

        <ion-scroll direction="x" scrollbar-x="false" >
            <div class="button-bar sub_header_list" id="sub_header_list">
                <a class="button button-clear sub_button_select" ng-click="changeTab(0,0)">待联系</a>
                <a class="button button-clear" ng-click="changeTab(1,1)">跟进中</a>
                <a class="button button-clear" ng-click="changeTab(4,2)">异常件</a>
            </div>
        </ion-scroll>
    </div>
    <ion-content class="has-subheader" style="background-color: #f2f2f6">
        <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()">
        </ion-refresher>


        <div ng-if="showloading" style="margin-top:60px; text-align: center">
            <ion-spinner icon="ios" style="height: 60px; width: 60px;;"></ion-spinner>
        </div>


        <div class="list todo_item" ng-repeat="order in taskListData">

            <a class="item item-icon-left item_top"   style="color: #adaead"  ng-href="#/follow_detail/{{order.id}}&{{order.orderNumber}}">
                {{order.createDate|date:'yyyy-MM-dd HH:mm:ss '}}
                <span class="item-note" style="color: #ef0a14">
                  质报内
                </span>
            </a>

            <a class="item item-avatar"  style="background-color: #f8f8f8"  ng-href="#/follow_detail/{{order.id}}&{{order.orderNumber}}"  ng-switch="order.questionOne">
                <img src="img/question_01.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="渗漏">
                <img src="img/question_02.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="户内装修">
                <img src="img/question_03.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="阳台、露台">
                <img src="img/question_04.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="给水">
                <img src="img/question_05.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="排水">
                <img src="img/question_06.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="插座、开关与光源">
                <img src="img/question_07.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="供暖">
                <img src="img/question_08.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="卫浴与小配件">
                <img src="img/question_09.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="阳台门、窗与配件">
                <img src="img/question_10.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="柜体">
                <h2>{{order.questionOne}}-{{order.questionTwo}}</h2>
                <p>{{order.describe}}</p>
            </a>

            <a class="item item-icon-left item_top"  style="color: #999999;font-size: 14px"  ng-href="#/follow_detail/{{order.id}}&{{order.orderNumber}}">
                <i class="icon ion-location" style="font-size: large"></i>
                {{order.buildingName}}{{order.buildingNum}}{{order.buildingHouseNum}}

            </a>


        </div>



        <ion-infinite-scroll icon="ion-load-d"  on-infinite="loadMore()" distance="1%" ng-if="moreDataCanBeLoaded()"></ion-infinite-scroll>
    </ion-content>
</ion-view>
